load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "lookupjoin",
    srcs = [
        "constraint_builder.go",
        "filter.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/opt/lookupjoin",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/sql/opt",
        "//pkg/sql/opt/cat",
        "//pkg/sql/opt/constraint",
        "//pkg/sql/opt/memo",
        "//pkg/sql/opt/norm",
        "//pkg/sql/opt/props",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/types",
        "//pkg/util/intsets",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "lookupjoin_test",
    srcs = [
        "constraint_builder_test.go",
        "exports_test.go",
    ],
    data = glob(["testdata/**"]),
    embed = [":lookupjoin"],
    deps = [
        "//pkg/settings/cluster",
        "//pkg/sql/opt",
        "//pkg/sql/opt/exec/execbuilder",
        "//pkg/sql/opt/memo",
        "//pkg/sql/opt/norm",
        "//pkg/sql/opt/optbuilder",
        "//pkg/sql/opt/props",
        "//pkg/sql/opt/testutils",
        "//pkg/sql/opt/testutils/testcat",
        "//pkg/sql/parser",
        "//pkg/sql/sem/catconstants",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/testutils/datapathutils",
        "//pkg/util/leaktest",
        "@com_github_cockroachdb_datadriven//:datadriven",
    ],
)
